package Day017_缓冲流_转换流_序列化流_打印流.ZuoYe;

import java.io.Serializable;

/**
 * @author zhangyan
 * @date 2020/5/9 20:51
 */
class Student implements Serializable {

    //给一个固定的版本号
    static final long SerialVersionUID = 123456L;

    String name;
    int age;
    String sex;

    public Student() {
    }

    public Student(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public static long getSerialVersionUID() {
        return SerialVersionUID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
}

